﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DelegateDemo
{
    public class Program
    {
        delegate int Transformer(int x);
        static int Square(int x) => x * x;
        static void Main(string[] args)
        {
            //Transformer transformer = new Transformer(Square);
            Transformer transformer = Square;
            //transformer.Invoke(3);
            int result = transformer(3);
            Console.WriteLine(result);
            Console.Read();
        }
    }
}
